#登录阿⾥云镜像仓
docker login --username=lizhaoyi registry.cn-guangzhou.aliyuncs.com --password=pddlzy123.
#构建整个项⽬，或者单独构建common项⽬,避免依赖未被构建上去
cd ../prd-common
mvn install

#构建网关
cd ../prd-gateway
mvn install -Dmaven.test.skip=true dockerfile:build
docker tag prd-cloud/prd-gateway:latest registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-gateway:v1.1
docker push registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-gateway:v1.1
echo "网关构建推送成功"

#构建oa模块
cd ../prd-oa
mvn install -Dmaven.test.skip=true dockerfile:build
#docker tag prd-cloud/prd-oa:latest registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-oa:v1.1
#docker push registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-oa:v1.1
echo "构建oa模块"

#构建用户模块
cd ../prd-user
mvn install -Dmaven.test.skip=true dockerfile:build
#docker tag prd-cloud/prd-user:latest registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-user:v1.1
#docker push registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-user:v1.1
echo "构建用户模块"

#构建peer模块
cd ../prd-peer
mvn install -Dmaven.test.skip=true dockerfile:build
docker tag prd-cloud/prd-peer:latest registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-peer:v1.1
docker push registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-peer:v1.1
echo "构建peer模块"

##构建供应商管理scm模块
#cd ../prd-scm
#mvn install -Dmaven.test.skip=true dockerfile:build
#docker tag prd-cloud/prd-scm:latest registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-scm:v1.1
#docker push registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-scm:v1.1
#echo "构建供应商管理scm模块"

#构建企业管理模块
cd ../prd-enterprise
mvn install -Dmaven.test.skip=true dockerfile:build
#docker tag prd-cloud/prd-enterprise:latest registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-enterprise:v1.1
#docker push registry.cn-guangzhou.aliyuncs.com/prd-2023/prd-enterprise:v1.1
echo "构建构建企业管理模块"

echo "业务管理系统PRD服务构建推送成功"
echo "=======构建脚本执⾏完毕====="